home *** CD-ROM | disk | FTP | other *** search
/ Aminet 24 / Aminet 24 (1998)(GTI - Schatztruhe)[!][Apr 1998].iso / Aminet / comm / misc / WarTrans.lha / bin->hex < prev    next >
Encoding:
Text File  |  1998-02-28  |  356 b   |  19 lines

  1. INPUT "Enter FileName to Convert: ",OldFile$
  2. OPEN OldFile$ FOR INPUT AS #1
  3. INPUT "Enter Filname to Create: ",NewFile$
  4. OPEN NewFile$ FOR OUTPUT AS #2 
  5. EntireFile$ = INPUT$(LOF(1),#1)
  6.  
  7. FOR I = 1 TO LOF(1)
  8.  
  9. A$ = HEX$(ASC(RIGHT$(LEFT$(EntireFile$,I),1)))
  10. IF LEN(A$) = 1 THEN
  11.    B$ = "0" 
  12.    PRINT #2,B$;A$;
  13. ELSE
  14.    PRINT #2,A$;
  15. END IF
  16. NEXT I
  17. CLOSE #1
  18. CLOSE #2
  19.